import java.io.IOException;
import  java.io.File;
public class demo1 {
    public static void main(String[] args) throws IOException {
            File file = new File("..\\hello-world.txt"); // 并不要求该⽂件真实存
            System.out.println(file.getParent());
            System.out.println(file.getName());
            System.out.println(file.getPath());
            System.out.println(file.getAbsolutePath());
            System.out.println(file.getCanonicalPath()    );

    }
}
